<template>
  <MdPreview
    :editorId="id"
    :modelValue="text"
    :codeFoldable="false"
    previewTheme="vuepress"
    codeTheme="github"
    :codeStyle="{ whiteSpace: 'pre-wrap' }"
  />
</template>
<script setup>
import '@/libs/md.js'
import { MdPreview, MdCatalog } from 'md-editor-v3'
// import 'md-editor-v3/lib/preview.css'

const props = defineProps({
  text: String,
})

const id = 'preview-only'
</script>
<style lang="scss" scoped>
:deep(.md-editor-code-block) {
  white-space: pre-wrap;
}
</style>
